/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.fgv.erp.modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author adao
 */
@Entity
@Table(name = "TipoImovel")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TipoImovel.findAll", query = "SELECT t FROM TipoImovel t"),
    @NamedQuery(name = "TipoImovel.findByTipoImovel", query = "SELECT t FROM TipoImovel t WHERE t.tipoImovel = :tipoImovel"),
    @NamedQuery(name = "TipoImovel.findByDescricao", query = "SELECT t FROM TipoImovel t WHERE t.descricao = :descricao"),
    @NamedQuery(name = "TipoImovel.findByMenu", query = "SELECT t FROM TipoImovel t WHERE t.menu = :menu"),
    @NamedQuery(name = "TipoImovel.findByNome", query = "SELECT t FROM TipoImovel t WHERE t.nome = :nome")})
public class TipoImovel implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "tipoImovel")
    private Long tipoImovel;
    @Size(max = 255)
    @Column(name = "descricao")
    private String descricao;
    @Column(name = "menu")
    private Boolean menu;
    @Size(max = 255)
    @Column(name = "nome")
    private String nome;

    public TipoImovel() {
    }

    public TipoImovel(Long tipoImovel) {
        this.tipoImovel = tipoImovel;
    }

    public Long getTipoImovel() {
        return tipoImovel;
    }

    public void setTipoImovel(Long tipoImovel) {
        this.tipoImovel = tipoImovel;
    }

    public String getDescricao() {
        return descricao;
    }

    public void setDescricao(String descricao) {
        this.descricao = descricao;
    }

    public Boolean getMenu() {
        return menu;
    }

    public void setMenu(Boolean menu) {
        this.menu = menu;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (tipoImovel != null ? tipoImovel.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TipoImovel)) {
            return false;
        }
        TipoImovel other = (TipoImovel) object;
        if ((this.tipoImovel == null && other.tipoImovel != null) || (this.tipoImovel != null && !this.tipoImovel.equals(other.tipoImovel))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.fgv.erp.modelo.TipoImovel[ tipoImovel=" + tipoImovel + " ]";
    }
    
}
